import React, { useState } from 'react'
import 'amis/lib/themes/cxd.css'
import { Schema } from 'amis/lib/types'
import RealTimeCodeEditor from '@/components/amis/RealTimeCodeEditor/RealTimeCodeEditor'
import globalConfig from '@/core/framework/config/globalConfig'

/**
 * 实时代码编辑器
 */
const UIRealTimeCodeEditor = (props: { code: Schema }): JSX.Element => {
	const [showFlag, setShowFlag] = useState(globalConfig.amisEditorShowFlag)
	return (
		<>
			<RealTimeCodeEditor code={props.code} />
		</>
	)
}

export default UIRealTimeCodeEditor
